/**
 * 首页api接口集合
 */
import request from '@/utils/request'

export function discoverApi() {
  return {
    getBanner: (params) => {
      return request({
        // 首页banner
        url: '/banner',
        method: 'post',
        params: params
      })
    },
    getNewMusic: (params) => {
      return request({
        // 最新音乐
        url: '/personalized/newsong',
        method: 'post',
        params: params
      })
    },
    getSongList: (params) => {
      return request({
        // 推荐歌单
        url: '/personalized',
        method: 'post',
        params: params
      })
    },
    getPrivateContent: (params) => {
      return request({
        // 独家放送
        url: '/personalized/privatecontent',
        method: 'post',
        params: params
      })
    },
    getMvList: (params) => {
      return request({
        // 推荐MV
        url: '/personalized/mv',
        method: 'post',
        params: params
      })
    },
    getNewsRadioList: (params) => {
      return request({
        // 主播电台
        url: '/dj/hot',
        method: 'post',
        params: params
      })
    },
    getEveryDayRecommendSongList: (params) => {
      return request({
        // 每日推荐歌曲
        url: '/recommend/songs',
        method: 'post',
        params: params
      })
    },
    getPlayListById: (params) => {
      return request({
        // 按 ID 获取播放列表
        url: 'playlist/detail',
        method: 'get',
        params: params
      })
    },
    getSongDetailById: (params) => {
      return request({
        // 按 ID 获取歌曲详细信息
        url: 'song/detail',
        method: 'post',
        params: params
      })
    }
  }
}
